package com.sec.android.app.myfiles.app;

import android.app.Application;
import android.content.Context;

import com.sec.android.app.myfiles.BuildConfig;
import com.sec.android.app.myfiles.info.AppFeatures;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;

/**
 * Created by jaebae on 2016-10-10.
 */
public class MyFilesApplication extends Application {
    private RefWatcher mRefWatcher;

    public static RefWatcher getRefWatcher(Context context) {
        MyFilesApplication application = (MyFilesApplication) context.getApplicationContext();
        return application.mRefWatcher;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        if (AppFeatures.SUPPORT_IA) {
        }

        if (BuildConfig.DEBUG && !LeakCanary.isInAnalyzerProcess(this)) {
            mRefWatcher = LeakCanary.install(this);
        }
    }
}
